package com.drop.service;

import com.drop.common.EasyUIDataGridResult;
import com.drop.common.MyCart;
import com.drop.common.MyType;
import com.drop.entity.Goods;

import java.util.List;

/**
 * 商品服务层
 * Created by 陈东一 on 2017/9/23 9:40
 */
public interface GoodsService {

	/**
	 * 根据商品id获取商品信息
	 * @param id
	 * @return
	 */
	public Goods showGoods(int id);
	
	public List<Goods> searchGoodsByTerm(String str);


	/**
	 * 显示商品类别
	 * @return
	 * @throws Exception
	 */
	public MyType showGoodsType() throws Exception;

	/**
	 * 显示所有商品
	 * @param shipid
	 * @return
	 */
	public EasyUIDataGridResult showAllGoods(int shipid,String page, String rows);


	/**
	 * 添加商品
	 * @param goodstype
	 * @param goodsName
	 * @param goodsContent
	 * @param price
	 * @param stock
	 * @param goodsImg
	 * @param shipid
	 * @return
	 */
	public MyCart addGoods(String goodstype, String goodsName, String goodsContent, String price, String stock, String goodsImg , int shipid);

	/**
	 * 修改商品
	 * @param goodstype
	 * @param goodsName
	 * @param goodsContent
	 * @param price
	 * @param stock
	 * @param goodsImg
	 * @param i
	 * @return
	 */
	public MyCart updateGoods(String goodsId ,String goodstype, String goodsName, String goodsContent, String price, String stock, String goodsImg, int i);

	/**
	 * 删除商品
	 * @param goodsId
	 * @return
	 */
	public MyCart deleteGoods(String goodsId);
}
